package io.renren.modules.noc.service.impl;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.noc.dao.NocBeerSeatDao;
import io.renren.modules.noc.entity.NocBeerSeatEntity;
import io.renren.modules.noc.service.NocBeerSeatService;


@Service("nocBeerSeatService")
public class NocBeerSeatServiceImpl extends ServiceImpl<NocBeerSeatDao, NocBeerSeatEntity> implements NocBeerSeatService {

    @Autowired
    private NocBeerSeatDao dao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String business_id = (String)params.get("business_id");
        IPage<NocBeerSeatEntity> page = this.page(
                new Query<NocBeerSeatEntity>().getPage(params),
                new QueryWrapper<NocBeerSeatEntity>()
                        .eq(StringUtils.isNotEmpty(business_id),"business_id",params.get("business_id"))
        );

        return new PageUtils(page);
    }

    @Override
    public List<NocBeerSeatEntity> getSeatNum(Map<String,Object> map){
        return dao.getSeatNum(map);
    }

    @Override
    public List<NocBeerSeatEntity> getMemberSeatNum(Map<String,Object> map){
        return dao.getMemberSeatNum(map);
    }

    @Override
    public List<String> getRow(Map<String,Object> map){
        return dao.getRow(map);
    }

    @Override
    public List<String> getNum(Map<String,Object> map){
        return dao.getNum(map);
    }

    @Override
    public List<String> getNum2(Map<String,Object> map){
        return dao.getNum2(map);
    }

    @Override
    public List<NocBeerSeatEntity> getSeat(Map<String,Object> map){
        return dao.getSeat(map);
    }

    @Override
    public List<NocBeerSeatEntity> getFullTable(Map<String,Object> map){
        return dao.getFullTable(map);
    }

    @Override
    public List<NocBeerSeatEntity> getLeftNumTable(Map<String,Object> map){
        return dao.getLeftNumTable(map);
    }

    @Override
    public void remove(String id){
        dao.remove(id);
    }

    @Override
    public Map<String,Object> selectSeat(Map<String,Object> map){
        return dao.selectSeat(map);
    }


    @Override
    public List<NocBeerSeatEntity> getNofpBusinessSeatNum(Map<String,Object> map){
        return dao.getNofpBusinessSeatNum(map);
    }

    @Override
    public Map<String,Object> selectBusinessSeat(Map<String,Object> map){return dao.selectBusinessSeat(map);}


    @Override
    public Map<String,Object> selectCount(Map<String,Object> map){
        return dao.selectCount(map);
    }

    @Override
    public Map<String,Object> getArea(Map<String,Object> map){return dao.getArea(map);}
}
